<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>注册页面</title>
		<script type="text/javascript">
		function checkForm(){
			if( document.getElementById("username").value=='' ||
				document.getElementById("password").value=='' ||
				document.getElementById("repeat_password").value=='' ||
				document.getElementById("name").value=='' ){
				alert("请输入必填信息(用户名,密码,姓名)");	
				return false;
			}
			if(document.getElementById("password").value != document.getElementById("repeat_password").value){
				alert("两次密码不一样");
				return false;
			}
		}
		</script>
	</head>

	<body>
		<div id="mainBody">
			<div id="cancel">
			</div>
				<s:url id="url1" action="loginAction"></s:url> 
				<s:a href="%{url1}">取消</s:a>
			<div id="user">
	<s:form id="userProfile" action="RegisterAction" method="post" onsubmit="return checkForm();">
		<s:textfield id="username" name="username" label="用户名  "/>
		<s:password id="password" name="password" label="密码 "/>
		<s:password id="repeat_password" name="repeat_password" label="再次输入密码"/>
		<s:textfield id="name" name="name" label="姓名 "/>
		<s:textfield id="job" name="job" label="职位"/>
		<s:radio label="权限" id="grade" name="grade" list="#{0:'普通用户(只有读取用户数据的权利); ',1:'高级用户(拥有添加修改用户信息的权利); ',2:'管理员'}" value="0"/>
		<s:textfield id="phone" name="phone" label="电话"/>
		<s:submit value=" 提交 "/>
	</s:form>
	
		 <!--		<form name="userProfile" method="post"
					action="RegisterAction!register" onsubmit="return checkForm();">
					<label>
						<font color="red">*</font>用户名 :
					</label>
					<input type="text" id="username" name="username" maxlength="20" />
					<br/>
					<label>
						<font color="red">*</font>密码 :
					</label>
					<input type="password" id="password" name="password" maxlength="20" />
					<br/>
					<label>
						<font color="red">*</font>再次输入密码 :
					</label>
					<input type="password" id="repeat_password" name="repeat_password"
						maxlength="20" />
					<br/>
					<label>
						<font color="red">*</font>姓名 :
					</label>
					<input type="text" id="name" name="name" maxlength="20" />
					<br/>
					<label>
						职位 :
					</label>
					<input type="text" id="job" name="job" maxlength="20" />
					<br/>
					<label>
						电话 :
					</label>
					<input type="text" id="phone" name="phone" maxlength="20" />
					<br/>
					<input type="submit" id="submit" name="submit" class="submit"
						value="Submit"/>
					<input type="submit" id="cancel_submit" name="submit"
						class="cancel" value="Cancel" />

				</form>-->
				 
			</div>
		</div>
	</body>
</html>
